I am facing the following error when I try to save some information to my database:
Uncaught Sys.WebForms.PageRequestManagerParserErrorException: Sys.WebForms.PageRequestManagerParserErrorException: The message received from the server could not be parsed. Common causes for this error are when the response is modified by calls to Response.Write(), response filters, HttpModules, or server trace is enabled. Details: Error parsing near '
The error occurs when I try to save information inside <>, like this:
The button is inside an:
<asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
<telerik:RadButton ID="cmdSalvar" Text="Salvar" runat="server" Width="85px" OnClick="cmdSalvar_Click" Style="margin-left: 5px;" CssClass="nao-imprimir" />
I have tried many possibilities like using Triggers but none of them worked.
Thank you for your kind attention!
EDIT (Additional Info):
Inside this method cmdSalvar_Click has a validation and a call for the method SalvarNegociacao();
protected void cmdSalvar_Click(Object sender, EventArgs e)
{
if (!VerificaExisteTituloEmNegociacaoRealizada() && IsDadosValidos() && IsAlcadasValidas())
{
SalvarNegociacao();
}
}
The method SalvarNegociacao() calls a bunch of other methods that interacts with the database.
I have found a script that stops the error occurring, but still cannot insert these special characteres in the database.
Sys.WebForms.PageRequestManager.getInstance().add_endRequest(EndRequestHandler);
function EndRequestHandler(sender, args) {
if (args.get_error() != undefined) {
args.set_errorHandled(true);
}
}